package main;

import java.awt.BorderLayout;

import javax.swing.JFrame;

import model.Simulator;
import view.AbstractView;
import view.FieldView;
import controller.AbstractController;
import controller.AbstractMenuBar;
import controller.Controller;
import controller.MenuController;

public class Main {
	
	private JFrame screen;
	private AbstractController controller;
	private AbstractMenuBar menubar;
	private AbstractView view;
	private Simulator simulator;
	
	public Main(){
		controller = new Controller();
		menubar = new MenuController();
		simulator = new Simulator();
		view = new FieldView(400, 400, simulator);
	
		screen = new JFrame("Foxes and Rabbits");
		screen.setSize(800,600);
		screen.add(controller, BorderLayout.WEST);
		screen.add(view, BorderLayout.EAST);
		screen.setJMenuBar(menubar);
		screen.setVisible(true);
		screen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
}
